package com.kele.message.base;

import io.netty.buffer.ByteBuf;

import java.io.Serializable;

/**
 * 基础问询帧
 */
public abstract class QueryFrame implements Serializable {

    private static final long serialVersionUID = -1L;

    /**
     * 地址码
     */
    private int addressCode;
    /**
     * 功能码
     */
    private int functionCode;
    /**
     * crc16-modbus 校验码
     */
    private ByteBuf checkCode;

    public int getAddressCode() {
        return addressCode;
    }

    public void setAddressCode(int addressCode) {
        this.addressCode = addressCode;
    }

    public int getFunctionCode() {
        return functionCode;
    }

    public void setFunctionCode(int functionCode) {
        this.functionCode = functionCode;
    }

    public ByteBuf getCheckCode() {
        return checkCode;
    }

    public void setCheckCode(ByteBuf checkCode) {
        this.checkCode = checkCode;
    }
}
